
cmake_minimum_required(VERSION 3.5.1)

project(OApiBase-api LANGUAGES CXX VERSION 0.0.1)

include(cmake/SparkEnvConfig.cmake)
include(cmake/SparkMacrosConfig.cmake)
include(cmake/SparkFindLibraries.cmake)
include(cmake/SparkFindQt5Config.cmake)
include(cmake/SparkFindQt6Config.cmake)

# 资源文件路径
set(QRC_SOURCES "")

# 优雅的将 CodeGenerator/client 下的代码构建为 OpenAPI 库
spark_add_libraries_path(OpenAPI CodeGenerator/client)
target_link_qt5(OpenAPI)  # 优雅的使其链接到 qt5 核心库


# 将项目构建，并优雅的链接到 OpenAPI 库
spark_add_executable_path(${PROJECT_NAME} src
    ${QRC_SOURCES}
)
target_link_OpenAPI(${PROJECT_NAME})


include(cmake/SparkBuildGraphviz.cmake)